using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class vt_CustAcctBaldifMap : EntityTypeConfiguration<vt_CustAcctBaldif>
    {
        public vt_CustAcctBaldifMap()
        {
            // Primary Key
            this.HasKey(t => t.account);

            // Properties
            this.Property(t => t.ID)
                .HasMaxLength(6);

            this.Property(t => t.Cutomer)
                .HasMaxLength(110);

            this.Property(t => t.account)
                .IsRequired()
                .HasMaxLength(40);

            // Table & Column Mappings
            this.ToTable("vt_CustAcctBaldif");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Cutomer).HasColumnName("Cutomer");
            this.Property(t => t.account).HasColumnName("account");
            this.Property(t => t.Customer_balance).HasColumnName("Customer_balance");
            this.Property(t => t.Account_balance).HasColumnName("Account_balance");
            this.Property(t => t.difference).HasColumnName("difference");
        }
    }
}
